<template>
<div class="big">
  <div class="big-1">
    <div class="top">
      <div class="t_logo"></div>
      <div class="search">
        <van-icon name="search" size="0.4rem"/>
        <input type="text">
      </div>
    </div>
    <swiper :arrp="arr"></swiper>
    <div class="nav">
      <div>
        <van-icon name="pending-payment" size="0.35rem"/>
        <p>icon1</p>
      </div>
      <div>
        <van-icon name="comment-o" size="0.35rem"/>
        <p>icon2</p>
      </div>
      <div>
        <van-icon name="like-o" size="0.35rem"/>
        <p>icon3</p>
      </div>
      <div>
        <van-icon name="apps-o" size="0.35rem"/>
        <p>icon4</p>
      </div>
      <div>
        <van-icon name="orders-o" size="0.35rem"/>
        <p>icon5</p>
      </div>
    </div>
    <div class="shop">
      <phone :arri="arr1"></phone>
    </div>
  </div>
</div>
</template>

<script>
import Phone from './home-phone/Phone'
import { rotationChart, homeGoods } from '../../api/index'
import Swiper from '../../components/swiper/Swiper'
export default {
  name: 'Home',
  data () {
    return {
      arr: [],
      arr1: [],
      arr2: []
    }
  },
  components: {
    Swiper,
    Phone
  },
  methods: {
    async getphoto () {
      const res = await rotationChart()
      this.arr = res
    },
    async getlogo () {
      const res = await homeGoods()
      this.arr1 = res
    }
  },
  created () {
    this.getphoto()
    this.getlogo()
  }
}
</script>

<style scoped lang="less">
.big{
  width: 100%;
  background: #F3F3F3;
  overflow: hidden;
  .big-1{
    width: 95%;
    margin: auto;
    margin-top: 0.2rem;
    background: #9B9B9B;
    overflow: hidden;
    border: 0.01rem solid #D5D5D7;
    margin-bottom: 0.87rem;
  }
}
  .top{
    width: 100%;
    height: 1.12rem;
    background: #F2F2F2;
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  .t_logo{
    width: 0.6rem;
    height: 0.6rem;
    background: #87CEEB;
    border-radius: 50%;
  }
  .search{
    width: 3.8rem;
    height: 0.5rem;
    border: 0.01rem solid #E5E5E5;
    background: #ffffff;
    border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    input{
      border: none;
    }
  }
  .photo{
    width: 100%;
    height: 3rem;
  }
  .nav{
    width: 100%;
    height: 1.2rem;
    display: flex;
    background: #ffffff;
    justify-content: space-around;
    align-items: center;
    div{
      text-align: center;
    }
  }
  .shop{
    width: 100%;
  }
</style>
